package com.np.mvp1;

import java.util.Arrays;
import java.util.List;
import java.util.Random;

import android.os.Handler;

public class Model implements IContract.Model {

    private List<String> mNoteList = Arrays.asList(
            "DSA Self Paced: Master the basics of Data Structures and Algorithms to solve complex problems efficiently. ",
            "Placement 100: This course will guide you for placement with theory,lecture videos, weekly assignments contests and doubt assistance.",
            "Amazon SDE Test Series: Test your skill & give the final touch to your preparation before applying for product based against like Amazon, Microsoft, etc.",
            "Complete Interview Preparation: Cover all the important concepts and topics required for the interviews. Get placement ready before the interviews begin",
            "Low Level Design for SDE 1 Interview: Learn Object-oriented Analysis and Design to prepare for SDE 1 Interviews in top companies"
    );

    @Override
    public void getNext(final CallBack callBack) {

        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                callBack.onGetNextSuccess(getRandom());
            }
        }, 1200);

    }

    private String getRandom() {
        int index = new Random().nextInt(mNoteList.size());
        return mNoteList.get(index);
    }
}
